--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 4f4fbc204a88afe6e90be3aba3bdb611c9e8d9b7
Parents : 2a4fb9c
Author : Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-04-24T15:02:01-05:00
refactor(android): simplify Python sync task and remove product flavors from build.gradle
Changes
2 files changed, 18 insertions(+), 48 deletions(-)
Diff
diff --git a/android/app/build.gradle b/android/app/build.gradle
index a83001d9..dbc78ba4 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -42,17 +42,6 @@ android {
namespace 'com.meshchatx'
compileSdk 34
- flavorDimensions "pythonBundle"
- productFlavors {
- slim {
- dimension "pythonBundle"
- isDefault true
- }
- full {
- dimension "pythonBundle"
- }
- }
-
defaultConfig {
applicationId "com.meshchatx"
minSdk 24
@@ -114,47 +103,28 @@ tasks.register("fetchRepositoryBundledWheels", Exec) {
}
}
-def registerMeshchatPythonSync = { String bundle ->
- def cap = bundle.capitalize()
- tasks.register("syncMeshchatPython${cap}", Sync) {
- if (bundle == "full") {
- dependsOn("fetchRepositoryBundledWheels")
- }
- if (!meshchatSourceDir.exists()) {
- throw new org.gradle.api.GradleException("Missing meshchatx source directory at ${meshchatSourceDir}")
- }
- doFirst {
- delete(
- file("$projectDir/src/main/python/meshchatx"),
- file("$projectDir/src/main/python/LXST"),
- file("$projectDir/src/main/python/LXMF"),
- file("$projectDir/src/main/python/RNS")
- )
- }
- from(meshchatSourceDir) {
- if (bundle == "slim") {
- exclude("src/frontend/**")
- exclude("public/reticulum-docs-bundled/**")
- exclude("public/rnode-flasher/**")
- exclude("public/repository-server-bundled/**")
- }
- }
- includeEmptyDirs = false
- from(new File(repoRoot, "CHANGELOG.md"))
- into(file("$projectDir/src/${bundle}/python/meshchatx"))
+tasks.register("syncMeshchatPython", Sync) {
+ dependsOn("fetchRepositoryBundledWheels")
+ if (!meshchatSourceDir.exists()) {
+ throw new org.gradle.api.GradleException("Missing meshchatx source directory at ${meshchatSourceDir}")
}
+ doFirst {
+ delete(
+ file("$projectDir/src/main/python/meshchatx"),
+ file("$projectDir/src/main/python/LXST"),
+ file("$projectDir/src/main/python/LXMF"),
+ file("$projectDir/src/main/python/RNS")
+ )
+ }
+ from(meshchatSourceDir)
+ includeEmptyDirs = false
+ from(new File(repoRoot, "CHANGELOG.md"))
+ into(file("$projectDir/src/main/python/meshchatx"))
}
-registerMeshchatPythonSync("slim")
-registerMeshchatPythonSync("full")
-
tasks.configureEach { task ->
if (task.name.toLowerCase().contains("merge") && task.name.toLowerCase().contains("pythonsources")) {
- if (task.name.contains("Slim")) {
- task.dependsOn(tasks.named("syncMeshchatPythonSlim"))
- } else if (task.name.contains("Full")) {
- task.dependsOn(tasks.named("syncMeshchatPythonFull"))
- }
+ task.dependsOn(tasks.named("syncMeshchatPython"))
}
}
diff --git a/scripts/sign-android-apks.sh b/scripts/sign-android-apks.sh
index eae29d2a..485a6209 100755
--- a/scripts/sign-android-apks.sh
+++ b/scripts/sign-android-apks.sh
@@ -80,7 +80,7 @@ if [[ ! -x "${BT_DIR}/zipalign" || ! -x "${BT_DIR}/apksigner" ]]; then
exit 1
fi
-APK_GLOB="${APK_GLOB:-android/app/build/outputs/apk/*/release/*-unsigned.apk}"
+APK_GLOB="${APK_GLOB:-android/app/build/outputs/apk/release/*-unsigned.apk}"
shopt -s nullglob
APKS=( ${APK_GLOB} )
shopt -u nullglob
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────